{% if site.run-time.enable %}
<div id="run-time">
  <script language="javascript">
    function show_date_time() {
      window.setTimeout("show_date_time()", 1000);
      BirthDay = new Date("{{ site.run-time.start-time }}");
      today = new Date();
      timeold = (today.getTime() - BirthDay.getTime());
      sectimeold = timeold / 1000
      secondsold = Math.floor(sectimeold);
      msPerDay = 24 * 60 * 60 * 1000
      e_daysold = timeold / msPerDay
      daysold = Math.floor(e_daysold);
      e_hrsold = (e_daysold - daysold) * 24;
      hrsold = setzero(Math.floor(e_hrsold));
      e_minsold = (e_hrsold - hrsold) * 60;
      minsold = setzero(Math.floor((e_hrsold - hrsold) * 60));
      seconds = setzero(Math.floor((e_minsold - minsold) * 60));
      document.getElementById('run-time').innerHTML = "{{ site.run-time.alert }}" + daysold + "{{ site.run-time.day }}" + hrsold + "{{ site.run-time.hour }}" + minsold + "{{ site.run-time.minute }}" + seconds + "{{ site.run-time.second }}";
    }
    function setzero(i) {
      if (i < 10) { i = "0" + i };
      return i;
    }
    show_date_time();
  </script>
</div>
{% endif %}
